Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Netlify deploy previews resilient on forks #6728

Merged
merged 2 commits into from
Sep 8, 2022
Merged

Conversation

cicdw
Copy link
Member

@cicdw cicdw commented Sep 7, 2022

Currently every PR opened from a fork results in a Netlify notification asking to approve the deploy preview; because many of our open source PRs are documentation related, it is convenient to see these builds often. Right now, we have sensitive environment variables for interacting with our MkDocs insiders repo so we don't want to use those for "untrusted" builds.

This PR attempts to change our Netlify build command so that it first attempts to install our Insiders package, but if that fails it falls back to a standard MkDocs build (which should work). We can then turn builds on for unknown authors that don't set sensitive environment variables. This should hopefully let us see useful deploy previews at the cost of not knowing if our insider builds are failing (this should be readily apparent though).

Example

Let's see how the deploy previews go in practice!

Checklist

  • This pull request references any related issue by including "closes <link to issue>"
    • If no issue exists and your change is not a small fix, please create an issue first.
  • This pull request includes tests or only affects documentation.
  • This pull request includes a fix, feature, enhancement, docs, or maintenance label categorizing the change.

@cicdw cicdw added the docs label Sep 7, 2022
@cicdw cicdw requested a review from zanieb as a code owner September 7, 2022 14:55
@netlify
Copy link

netlify bot commented Sep 7, 2022

Deploy Preview for prefect-orion ready!

Name Link
🔨 Latest commit 69361fb
🔍 Latest deploy log https://app.netlify.com/sites/prefect-orion/deploys/6318b1473755ee00085706e2
😎 Deploy Preview https://deploy-preview-6728--prefect-orion.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@cicdw cicdw added the development Tech debt, refactors, CI, tests, and other related work. label Sep 7, 2022
Copy link
Contributor

@zanieb zanieb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems worth adding a comment in the toml file explaining what's happening, otherwise seems good to me.

I did notice a while ago that you get direct notifications for each of those preview approvals and was curious how long that would last :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
development Tech debt, refactors, CI, tests, and other related work. docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants